// 快递接口
import request from '@/utils/request'

export function orderInsert(data) {
  return request({
    url: 'order/express/delivery/orderInsert',
    method: 'post',
    data,
  })
}
export function orderList(data) {
  return request({
    url: 'order/express/delivery/orderList',
    method: 'post',
    data,
  })
}
// 导入订单
// /order/info/importOrder/{deptId}/{transportType}/{detail}/{dataSource}
export function importOrder(deptId, dataSource, data) {
  return request({
    url: `order/express/delivery/importOrder/${ deptId }/${ dataSource }`,
    method: 'post',
    data,
  })
}  
export function expressCheckOutList(params) {
  return request({
    url: 'order/express/delivery/expressCheckOut/list',
   
    params,
  })
}
// 强制制单

export function expressCompelPrint(orderNos) {
  return request({
    url: `order/express/delivery/expressCompelPrint/${ orderNos }`,
    method: 'delete',
    
  })
}

export function checkoutDetails(id) {
  return request({
    url: `order/express/delivery/checkoutDetails/${ id }`,
  })
}

export function editOrder(data) {
  return request({
    url: 'order/express/delivery/editOrder',
    method: 'PUT',
    data,
  })
}
export function outExpressCheckout(data) {
  return request({
    url: 'order/express/delivery/outExpressCheckout',
    method: 'PUT',
    data,
  })
}
export function revokeOutExpress(data) {
  return request({
    url: 'order/express/delivery/revokeOutExpress',
    method: 'PUT',
    data,
  })
}

export function forcePlaceOrder4(data) {
  return request({
    url: `order/express/delivery/expressCompelPrint/${ data }`,
    method: 'delete',
  })
}

// 撤单

export function deleteInfo4(ids, data) {
  return request({
    url: `order/express/delivery/cancelOrder/${ ids }`,
    method: 'delete',
    data,
  })
}

// 国内报关
export function domesticCustomsDeclaration(data) {
  return request({
    url: 'order/express/delivery/domesticCustomsDeclaration',
    method: 'put',
    data,
  })
}
// 已提交海外仓
export function submittedOverseasWarehouse(data) {
  return request({
    url: 'order/express/delivery/submittedOverseasWarehouse',
    method: 'put',
    data,
  })
}
// 国内查验
export function domesticInspection(data) {
  return request({
    url: 'order/express/delivery/domesticInspection',
    method: 'put',
    data,
  })
}
// 国内已放行
export function releasedInChina(data) {
  return request({
    url: 'order/express/delivery/releasedInChina',
    method: 'put',
    data,
  })
}
// 已到港
export function arrivedInHongKong(data) {
  return request({
    url: 'order/express/delivery/arrivedInHongKong',
    method: 'put',
    data,
  })
}
// 国外清关
export function foreignCustomsClearance(data) {
  return request({
    url: 'order/express/delivery/foreignCustomsClearance',
    method: 'put',
    data,
  })
}

// 国外查验
export function overseasInspection(data) {
  return request({
    url: 'order/express/delivery/overseasInspection',
    method: 'put',
    data,
  })
}
// 国外清关已放行
export function customsClearance(data) {
  return request({
    url: 'order/express/delivery/customsClearance',
    method: 'put',
    data,
  })
}
// 已提交UPS
export function submittedUPS(data) {
  return request({
    url: 'order/express/delivery/submittedUPS',
    method: 'put',
    data,
  })
}
